﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebChatDAL;
using System.Text;

namespace WebChat.User
{
    public partial class Channels : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                WebChatDAO dao = new WebChatDAO();
                this.GridViewChannels.DataSource = dao.GetChannels();
                this.GridViewChannels.DataBind();
            }
        }

        protected void GridViewChannels_OnRowEditing(object sender, EventArgs args)
        { 
        }

        protected string SafeEval(string propertyName)
        {
            string value = (string)Eval(propertyName);
            string safeValue = Server.HtmlEncode(value);

            return safeValue;            
        }
    }
}